package a.j;

import a.c.m;
import a.c.w;
import a.c.y;

import javax.swing.*;
import javax.swing.event.CaretEvent;
import javax.swing.event.CaretListener;
import javax.swing.text.BadLocationException;
import java.awt.*;
import java.awt.dnd.Autoscroll;
import java.awt.event.*;
import java.awt.font.TextLayout;
import java.awt.geom.AffineTransform;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;

public class og
  extends JComponent
  implements af, Autoscroll
{
  private static final byte e = 0;
  private static final byte f = 1;
  private static final int g = 0;
  private static final int h = 1;
  private static final String j = "commitValue";
  private static final String k = "oldLabelText";
  private static final String l = "pcl";
  private static final String m = "ylabel";
  private static final String n = "disabledViewModes";
  private static final String o = "activeViewMode";
  private double p = 1.0D;
  AffineTransform q = new AffineTransform();
  private Rectangle2D.Double r;
  Point2D.Double s = new Point2D.Double();
  private Rectangle t;
  private Rectangle2D.Double u = new Rectangle2D.Double();
  private Rectangle2D.Double v;
  private int w = 0;
  private int x = 0;
  private static final int y = 666;
  private static final int z = 555;
  private static final int A = 2;
  private pg B;
  private boolean C;
  private boolean D;
  private double E;
  private double F;
  private Color G;
  private int H;
  private boolean I;
  private a_ J;
  i K;
  i L;
  private db M;
  private String N;
  private hc O;
  private double P = 0.3D;
  private boolean Q;
  private boolean R = true;
  private List S = new ArrayList(5);
  private boolean T;
  private JTextArea U;
  static final boolean V = true;
  Insets W = new Insets(10, 10, 10, 10);
  private static final Color X = new Color(107, 107, 107);
  private static final Color Y = new Color(149, 149, 149);
  public static int Z;
  
  protected void processMouseEvent(MouseEvent paramMouseEvent)
  {
    if (!ld.E) {
      if (this.I) {
        return;
      }
    }
    super.processMouseEvent(paramMouseEvent);
  }
  
  boolean a()
  {
    return this.I;
  }
  
  void a(boolean paramBoolean)
  {
    this.I = paramBoolean;
  }
  
  protected boolean processKeyBinding(KeyStroke paramKeyStroke, KeyEvent paramKeyEvent, int paramInt, boolean paramBoolean)
  {
    if (!ld.E) {
      if (this.I) {
        return false;
      }
    }
    return super.processKeyBinding(paramKeyStroke, paramKeyEvent, paramInt, paramBoolean);
  }
  
  protected void processKeyEvent(KeyEvent paramKeyEvent)
  {
    if (!ld.E) {
      if (this.I) {
        return;
      }
    }
    super.processKeyEvent(paramKeyEvent);
  }
  
  protected void processMouseMotionEvent(MouseEvent paramMouseEvent)
  {
    if (!ld.E) {
      if (this.I) {
        return;
      }
    }
    super.processMouseMotionEvent(paramMouseEvent);
  }
  
  protected void processMouseWheelEvent(MouseWheelEvent paramMouseWheelEvent)
  {
    if (!ld.E) {
      if (this.I) {
        return;
      }
    }
    super.processMouseWheelEvent(paramMouseWheelEvent);
  }
  
  og(pg parampg)
  {
    setOpaque(true);
    this.B = parampg;
    setLayout(new he());
    this.K = new i();
    this.L = new i();
    this.F = 25.0D;
    this.E = 25.0D;
    this.G = Color.gray;
    this.H = 3;
    this.M = new jb(this.B);
    this.O = new mb();
    ToolTipManager.sharedInstance().registerComponent(this);
  }
  
  JComponent b()
  {
    if (!ld.E) {
      if (this.J == null)
      {
        this.J = new a_();
        add(this.J);
      }
    }
    return this.J;
  }
  
  public Image c()
  {
    int i = F();
    int i1 = G();
    BufferedImage localBufferedImage = new BufferedImage(i, i1, 1);
    Graphics2D localGraphics2D = (Graphics2D)localBufferedImage.getGraphics();
    localGraphics2D.setClip(0, 0, i, i1);
    paintComponent(localGraphics2D);
    return localBufferedImage;
  }
  
  private g d()
  {
    return this.B.a();
  }
  
  public void e()
  {
    if (!ld.E) {
      if (this.w == 666) {
        d(true);
      }
    }
    a(0, 0, getWidth(), getHeight());
  }
  
  public void a(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    boolean bool = ld.E;
    int i = (int)Math.floor((paramDouble1 - this.s.x) * this.p);
    int i1 = (int)Math.floor((paramDouble2 - this.s.y) * this.p);
    int i2 = (int)Math.ceil(paramDouble3 * this.p);
    int i3 = (int)Math.ceil(paramDouble4 * this.p);
    if (!bool) {
      if (this.w != 0)
      {
        if (bool) {
          break label115;
        }
        repaint(i, i1, i2, i3);
        if (!ld.D) {
          return;
        }
      }
    }
    label115:
    a(i, i1, i2, i3);
  }
  
  private void a(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    Object localObject1;
    Rectangle localRectangle1;
    if (!bool2)
    {
      if (this.w == 1)
      {
        localObject1 = d().a((byte)0);
        localRectangle1 = this.K.getBounds();
        Rectangle localRectangle2 = this.L.getBounds();
        if (!bool2) {
          if (localRectangle1.getWidth() > 0.0D)
          {
            if (!bool2) {
              if (((Rectangle)localObject1).getWidth() >= 0.0D)
              {
                localObject2 = ((Rectangle)localObject1).union(localRectangle1);
                if (bool2) {
                  break label125;
                }
                if (!bool1) {
                  break label118;
                }
              }
            }
            localObject2 = localRectangle1;
            if (bool2) {
              break label125;
            }
            if (!bool1) {
              break label118;
            }
          }
        }
        Object localObject2 = localObject1;
        label118:
        label125:
        Object localObject3;
        if (!bool2)
        {
          if (localRectangle2.getWidth() > 0.0D) {
            localObject2 = ((Rectangle)localObject2).union(localRectangle2);
          }
          if (bool2) {}
        }
        else if (((Rectangle)localObject2).getWidth() > 0.0D)
        {
          if (bool2) {
            break label194;
          }
          if ((this.O instanceof mb))
          {
            localObject3 = (mb)this.O;
            localObject2 = a((Rectangle)localObject2, ((mb)localObject3).h());
          }
        }
        label194:
        if (!bool2)
        {
          if (this.t != null)
          {
            localObject3 = a((Rectangle)localObject2, this.t);
            localObject3 = a((Rectangle)localObject3, 8 + (int)(((Rectangle)localObject3).width * 0.05D));
            this.t = ((Rectangle)localObject2);
            localObject2 = localObject3;
          }
          paramInt1 = (int)Math.round((((Rectangle)localObject2).getX() - this.s.getX()) * this.p);
          paramInt2 = (int)Math.round((((Rectangle)localObject2).getY() - this.s.getY()) * this.p);
          paramInt3 = (int)Math.round(((Rectangle)localObject2).getWidth() * this.p);
        }
        paramInt4 = (int)Math.round(((Rectangle)localObject2).getHeight() * this.p);
        if (bool2) {
          break label452;
        }
        if (!bool1) {}
      }
      else
      {
        if (bool2) {
          break label452;
        }
      }
    }
    else if (this.w == 2)
    {
      localObject1 = b(this.u);
      if ((bool2) || (this.v != null)) {
        Rectangle2D.union(this.u, this.v, (Rectangle2D)localObject1);
      }
      localRectangle1 = new Rectangle();
      a((Rectangle2D.Double)localObject1, localRectangle1);
      paramInt1 = localRectangle1.x - 2;
      paramInt2 = localRectangle1.y - 2;
      paramInt3 = localRectangle1.width + 4;
      paramInt4 = localRectangle1.height + 4;
      this.v = b(this.u);
    }
    if (!bool2) {
      if (this.C)
      {
        label452:
        if (bool2) {
          break label480;
        }
        paintImmediately(paramInt1, paramInt2, paramInt3, paramInt4);
        if (!bool1) {
          return;
        }
      }
    }
    label480:
    repaint(paramInt1, paramInt2, paramInt3, paramInt4);
  }
  
  public void setBounds(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    boolean bool = ld.E;
    if (!bool)
    {
      if (getBounds().equals(new Rectangle(paramInt1, paramInt2, paramInt3, paramInt4))) {
        return;
      }
      if (bool) {}
    }
    else
    {
      if (this.w == 666) {
        d(false);
      }
      super.setBounds(paramInt1, paramInt2, paramInt3, paramInt4);
    }
    n();
  }
  
  public void reshape(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    boolean bool = ld.E;
    if (!bool)
    {
      if (getBounds().equals(new Rectangle(paramInt1, paramInt2, paramInt3, paramInt4))) {
        return;
      }
      if (bool) {}
    }
    else
    {
      if (this.w == 666) {
        d(false);
      }
      super.reshape(paramInt1, paramInt2, paramInt3, paramInt4);
    }
    n();
  }
  
  public void setBounds(Rectangle paramRectangle)
  {
    Rectangle localRectangle = getBounds();
    super.setBounds(paramRectangle);
    firePropertyChange("Bounds", localRectangle, paramRectangle);
  }
  
  public Point f()
  {
    return new Point((int)this.s.x, (int)this.s.y);
  }
  
  public Point2D.Double g()
  {
    return new Point2D.Double(this.s.x, this.s.y);
  }
  
  public void a(double paramDouble1, double paramDouble2)
  {
    boolean bool = ld.E;
    if (!bool) {
      if (!A()) {
        return;
      }
    }
    Point2D.Double localDouble = g();
    if (!bool)
    {
      if (this.v != null) {
        this.v.setFrame(this.s.x, this.s.y, F() / this.p, G() / this.p);
      }
      this.s.x = paramDouble1;
      this.s.y = paramDouble2;
      n();
    }
    firePropertyChange("ViewPoint", localDouble, g());
  }
  
  public void b(double paramDouble1, double paramDouble2)
  {
    if (!ld.E) {
      if (!A()) {
        return;
      }
    }
    a(paramDouble1 - C() / (2.0D * this.p), paramDouble2 - D() / (2.0D * this.p));
  }
  
  public Point2D h()
  {
    Point2D.Double localDouble = new Point2D.Double();
    localDouble.setLocation(this.s.getX() + C() / (2.0D * this.p), this.s.getY() + D() / (2.0D * this.p));
    return localDouble;
  }
  
  public double i()
  {
    return this.p;
  }
  
  public void a(double paramDouble)
  {
    boolean bool = ld.E;
    if (!bool)
    {
      if (paramDouble <= 0.0D) {
        throw new IllegalArgumentException("Zoom must be positive! was " + paramDouble);
      }
      paramDouble = Math.max(9.000000000000001E-005D, paramDouble);
      paramDouble = Math.min(100001.0D, paramDouble);
      if (bool) {}
    }
    else
    {
      if (!A()) {
        return;
      }
      a(this.s.x + C() * (1.0D / this.p - 1.0D / paramDouble) / 2.0D, this.s.y + D() * (1.0D / this.p - 1.0D / paramDouble) / 2.0D);
    }
    double d = this.p;
    this.p = paramDouble;
    firePropertyChange("Zoom", d, this.p);
    n();
  }
  
  public void b(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    a(paramDouble1, paramDouble2, paramDouble3, paramDouble4, this.B.getParent() != null);
  }
  
  private void a(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, boolean paramBoolean)
  {
    boolean bool = ld.E;
    double d1 = i();
    if (!bool)
    {
      a(paramDouble1, paramDouble2, paramDouble3, paramDouble4, C(), D());
      if (paramBoolean)
      {
        this.B.q();
        if (!bool) {
          if (getWidth() > 0)
          {
            if (bool) {
              break label90;
            }
            if (getHeight() > 0) {
              a(paramDouble1, paramDouble2, paramDouble3, paramDouble4, F(), G());
            }
          }
        }
        label90:
        this.B.p();
      }
    }
    double d2 = i();
    if (d2 != d1) {
      firePropertyChange("Zoom", d1, d2);
    }
  }
  
  private void a(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, int paramInt1, int paramInt2)
  {
    boolean bool = ld.E;
    double d1 = paramInt1 / i();
    double d2 = paramInt2 / i();
    if (!bool) {
      if (d1 / d2 > paramDouble3 / paramDouble4)
      {
        this.p = (this.p * d2 / paramDouble4);
        a(paramDouble1 - (paramInt1 / this.p - paramDouble3) / 2.0D, paramDouble2);
        if (!bool) {
          if (!ld.D) {
            return;
          }
        }
      }
      else
      {
        this.p = (this.p * d1 / paramDouble3);
      }
    }
    a(paramDouble1, paramDouble2 - (paramInt2 / this.p - paramDouble4) / 2.0D);
  }
  
  public void j()
  {
    a(this.B.H());
  }
  
  public void a(Rectangle paramRectangle)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (!bool2)
    {
      if (paramRectangle.getWidth() <= C()) {
        if (!bool2)
        {
          if (paramRectangle.getHeight() <= D()) {
            a(1.0D);
          }
        }
        else
        {
          if (!bool2) {
            if (paramRectangle.getWidth() > 0.0D)
            {
              if (!bool2) {
                if (paramRectangle.getHeight() > 0.0D) {
                  break label87;
                }
              }
            }
            else {
              a(0.0D, 0.0D);
            }
          }
          if (!bool2)
          {
            if (bool1) {
              label87:
              b(paramRectangle.getX() + paramRectangle.getWidth() / 2.0D, paramRectangle.getY() + paramRectangle.getHeight() / 2.0D);
            }
            m();
            if (bool2) {
              break label166;
            }
          }
          if (!bool1) {
            return;
          }
        }
      }
      a(paramRectangle.getX() - 10.0D, paramRectangle.getY() - 10.0D, paramRectangle.getWidth() + 20.0D, paramRectangle.getHeight() + 20.0D, false);
    }
    label166:
    m();
  }
  
  public void b(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    this.r = new Rectangle2D.Double(paramInt1, paramInt2, paramInt3, paramInt4);
    n();
  }
  
  public void c(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
  {
    this.r = new Rectangle2D.Double(paramDouble1, paramDouble2, paramDouble3, paramDouble4);
    n();
  }
  
  public Rectangle k()
  {
    if (!ld.E) {
      if (this.r == null) {
        l();
      }
    }
    return a(this.r);
  }
  
  public Rectangle2D.Double l()
  {
    if (!ld.E) {
      if (this.r == null)
      {
        Dimension localDimension = getPreferredSize();
        this.r = new Rectangle2D.Double(0.0D, 0.0D, localDimension.width, localDimension.height);
      }
    }
    return this.r;
  }
  
  public void m()
  {
    this.r.setRect(this.s.x, this.s.y, F() / i(), G() / i());
  }
  
  public void n()
  {
    boolean bool = ld.E;
    double d1 = F() / this.p;
    double d2 = G() / this.p;
    double d3 = this.s.x;
    double d4 = this.s.y;
    Rectangle2D.Double localDouble = l();
    if (!bool) {
      if (localDouble.x > d3)
      {
        localDouble.width += localDouble.x - d3;
        localDouble.x = d3;
      }
    }
    if (!bool) {
      if (localDouble.x + localDouble.width < d3 + d1) {
        localDouble.width = (d3 + d1 - localDouble.x);
      }
    }
    if (!bool) {
      if (localDouble.y > d4)
      {
        localDouble.height += localDouble.y - d4;
        localDouble.y = d4;
      }
    }
    if ((bool) || (localDouble.y + localDouble.height < d4 + d2)) {
      localDouble.height = (d4 + d2 - localDouble.y);
    }
  }
  
  public void o()
  {
    boolean bool = ld.E;
    Rectangle localRectangle = this.B.H();
    if (!bool) {
      if (this.r == null)
      {
        this.r = f(localRectangle);
        if (bool) {
          return;
        }
        if (!ld.D) {
          break label56;
        }
      }
    }
    this.r = a(this.r, f(localRectangle));
    label56:
    n();
  }
  
  public void print(Graphics paramGraphics)
  {
    boolean bool = this.T;
    this.T = true;
    try
    {
      super.print(paramGraphics);
    }
    finally
    {
      this.T = bool;
    }
  }
  
  public void paintComponent(Graphics paramGraphics)
  {
    boolean bool = ld.E;
    Graphics2D localGraphics2D = (Graphics2D)((Graphics2D)paramGraphics).create();
    localGraphics2D.addRenderingHints(this.B.bb());
    localGraphics2D.setRenderingHint(kg.y, new Double(r()));
    if (localGraphics2D.getRenderingHint(kg.z) == null)
    {
      pc localpc = this.B.r();
      if (!bool) {
        if (localpc.a() == null) {
          localpc.a(localGraphics2D.getTransform());
        }
      }
      if ((bool) || (!localpc.c())) {
        localpc.a(this.T);
      }
      localGraphics2D.setRenderingHint(kg.z, localpc);
    }
    double d1 = -this.s.getX();
    double d2 = -this.s.getY();
    AffineTransform localAffineTransform1 = localGraphics2D.getTransform();
    localGraphics2D.scale(this.p, this.p);
    localGraphics2D.translate(d1, d2);
    if (!bool) {
      if (this.R) {
        xe.a(localGraphics2D);
      }
    }
    a(localGraphics2D);
    AffineTransform localAffineTransform2 = localGraphics2D.getTransform();
    localGraphics2D.setTransform(localAffineTransform1);
    c(localGraphics2D);
    localGraphics2D.setTransform(localAffineTransform2);
    e(localGraphics2D);
    f(localGraphics2D);
    d(localGraphics2D);
    if (!bool)
    {
      if (this.w == 2)
      {
        AffineTransform localAffineTransform3 = localGraphics2D.getTransform();
        localGraphics2D.setTransform(localAffineTransform1);
        Rectangle2D.Double localDouble = new Rectangle2D.Double((this.u.getX() - this.s.getX()) * this.p, (this.u.getY() - this.s.getY()) * this.p, this.u.getWidth() * this.p, this.u.getHeight() * this.p);
        this.B.a(localGraphics2D, localDouble);
        localGraphics2D.setTransform(localAffineTransform3);
      }
      localGraphics2D.dispose();
    }
  }
  
  private void a(Graphics2D paramGraphics2D)
  {
    Rectangle localRectangle = paramGraphics2D.getClipBounds();
    int i = localRectangle.x;
    int i1 = localRectangle.y;
    int i2 = localRectangle.width;
    int i3 = localRectangle.height;
    a(paramGraphics2D, i, i1, i2, i3);
  }
  
  private void c(Graphics2D paramGraphics2D)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    Color localColor;
    if (!bool2) {
      if (this.Q)
      {
        if (bool2) {
          break label727;
        }
        if (this.p >= this.P)
        {
          localColor = paramGraphics2D.getColor();
          Stroke localStroke = paramGraphics2D.getStroke();
          paramGraphics2D.setColor(this.G);
          paramGraphics2D.setStroke(new BasicStroke(1.0F));
          Rectangle localRectangle = paramGraphics2D.getClipBounds();
          double d1 = Math.floor(this.s.x / this.E) * this.E - this.s.x;
          double d2 = Math.floor(this.s.y / this.F) * this.F - this.s.y;
          double d3 = d1 * this.p + Math.floor(-1.0D + localRectangle.x / (this.E * this.p)) * (this.E * this.p);
          double d4 = d2 * this.p + Math.floor(-1.0D + localRectangle.y / (this.F * this.p)) * (this.F * this.p);
          double d5 = localRectangle.x + localRectangle.width + this.E * this.p;
          double d6 = localRectangle.y + localRectangle.height + this.F * this.p;
          double d7 = this.E * this.p;
          double d8 = this.F * this.p;
          if (!bool2) {}
          int i2;
          int i3;
          double d9;
          int i4;
          switch (this.H)
          {
          case 1: 
            int i = localRectangle.y;
            int i1 = localRectangle.y + localRectangle.height;
            i2 = localRectangle.x;
            i3 = localRectangle.x + localRectangle.width;
            d9 = d3;
            do
            {
              do
              {
                if (d9 > d5) {
                  break;
                }
                i4 = (int)d9;
                paramGraphics2D.drawLine(i4, i, i4, i1);
                d9 += d7;
                if (bool2) {
                  break label433;
                }
                if (bool1) {
                  break label428;
                }
              } while (!bool1);
            } while (bool2);
            d9 = d4;
          case 3: 
          case 2: 
            label428:
            while (d9 <= d6)
            {
              label433:
              i4 = (int)d9;
              if (bool2) {
                break label716;
              }
              paramGraphics2D.drawLine(i2, i4, i3, i4);
              d9 += d8;
              if (bool1) {
                break label715;
              }
              if (bool1)
              {
                if (bool2) {
                  break label715;
                }
                d9 = d3;
                label700:
                label702:
                while (d9 <= d5)
                {
                  i4 = (int)d9;
                  if (bool1) {
                    break label715;
                  }
                  double d10 = d4;
                  int i5;
                  do
                  {
                    do
                    {
                      if (d10 > d6) {
                        break;
                      }
                      i5 = (int)d10;
                      paramGraphics2D.drawLine(i4, i5 - 3, i4, i5 + 3);
                      paramGraphics2D.drawLine(i4 - 3, i5, i4 + 3, i5);
                      d10 += d8;
                      if (bool2) {
                        break label587;
                      }
                      if (bool1) {
                        break label585;
                      }
                    } while (!bool1);
                  } while (bool2);
                  d9 += d7;
                  label585:
                  if (bool1)
                  {
                    label587:
                    if (bool2) {
                      break label715;
                    }
                    d9 = d3;
                    do
                    {
                      if (d9 > d5) {
                        break;
                      }
                      i4 = (int)d9;
                      if (bool1) {
                        break label715;
                      }
                      d10 = d4;
                      do
                      {
                        do
                        {
                          if (d10 > d6) {
                            break;
                          }
                          i5 = (int)d10;
                          paramGraphics2D.drawLine(i4, i5 - 1, i4, i5 + 1);
                          paramGraphics2D.drawLine(i4 - 1, i5, i4 + 1, i5);
                          d10 += d8;
                          if (bool2) {
                            break label702;
                          }
                          if (bool1) {
                            break label700;
                          }
                        } while (!bool1);
                      } while (bool2);
                      d9 += d7;
                    } while (!bool1);
                  }
                }
              }
            }
          }
          if (!bool2) {
            paramGraphics2D.setStroke(localStroke);
          }
          label715:
          label716:
          paramGraphics2D.setColor(localColor);
        }
      }
    }
    if (!(this.B instanceof qg))
    {
      label727:
      localColor = paramGraphics2D.getColor();
      a(this, paramGraphics2D, 10.0D, G() - 12);
      paramGraphics2D.setColor(localColor);
    }
  }
  
  private void a(Graphics2D paramGraphics2D, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
  {
    Color localColor = paramGraphics2D.getColor();
    Stroke localStroke = paramGraphics2D.getStroke();
    AffineTransform localAffineTransform = paramGraphics2D.getTransform();
    if (!ld.E)
    {
      if (this.M != null) {
        this.M.a(paramGraphics2D, paramInt1, paramInt2, paramInt3, paramInt4);
      }
      paramGraphics2D.setStroke(localStroke);
      paramGraphics2D.setColor(localColor);
      paramGraphics2D.setTransform(localAffineTransform);
    }
  }
  
  void d(Graphics2D paramGraphics2D)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (!bool2) {
      if (i() >= this.P)
      {
        this.K.paint(paramGraphics2D);
        localy = d().db();
        do
        {
          if (!localy.e()) {
            break;
          }
          ((qb)localy.j()).paint(paramGraphics2D);
          localy.f();
        } while (!bool1);
      }
    }
    y localy = this.K.h();
    do
    {
      do
      {
        if (!localy.e()) {
          break;
        }
        if (bool1) {
          break label177;
        }
        if ((localy.j() instanceof ac))
        {
          ((ac)localy.j()).a(paramGraphics2D);
          if (bool2) {
            continue;
          }
          if (!bool1) {}
        }
        else
        {
          ((qb)localy.j()).paint(paramGraphics2D);
        }
        localy.f();
      } while (!bool1);
    } while (bool2);
    localy = d().db();
    if (localy.e()) {
      label177:
      if (!bool2) {
        if ((localy.j() instanceof ac))
        {
          ((ac)localy.j()).a(paramGraphics2D);
          if (bool2) {
            break label243;
          }
          if (!bool1) {
            break label236;
          }
        }
      }
    }
    label236:
    label243:
    while (bool2)
    {
      ((qb)localy.j()).paint(paramGraphics2D);
      localy.f();
      if (!bool1) {
        break;
      }
    }
  }
  
  Collection p()
  {
    return new ArrayList(this.K);
  }
  
  Collection q()
  {
    return new ArrayList(this.L);
  }
  
  void e(Graphics2D paramGraphics2D)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (!bool2) {
      if (i() >= this.P)
      {
        if (bool2) {
          break label47;
        }
        this.L.paint(paramGraphics2D);
        if (!bool1) {
          return;
        }
      }
    }
    label47:
    y localy = this.L.h();
    label116:
    do
    {
      if (!localy.e()) {
        break;
      }
      if (!bool2) {
        if ((localy.j() instanceof ac))
        {
          ((ac)localy.j()).a(paramGraphics2D);
          if (bool2) {
            continue;
          }
          if (!bool1) {
            break label116;
          }
        }
      }
      ((qb)localy.j()).paint(paramGraphics2D);
      localy.f();
    } while (!bool1);
  }
  
  public void f(Graphics2D paramGraphics2D)
  {
    boolean bool = ld.E;
    if (!bool) {
      if (i() >= this.P)
      {
        if (bool) {
          break label53;
        }
        this.O.a(paramGraphics2D, d());
        if (!ld.D) {
          return;
        }
      }
    }
    label53:
    this.O.b(paramGraphics2D, d());
  }
  
  public void b(double paramDouble)
  {
    this.P = paramDouble;
  }
  
  public double r()
  {
    return this.P;
  }
  
  public void b(boolean paramBoolean)
  {
    boolean bool = ld.E;
    if (!bool)
    {
      if (paramBoolean)
      {
        this.w = 1;
        this.t = d().a((byte)0);
        if (bool) {
          break label44;
        }
      }
    }
    else if (!ld.D) {
      return;
    }
    this.w = 0;
    label44:
    this.t = null;
  }
  
  public void a(int paramInt)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (!bool2)
    {
      switch (paramInt)
      {
      case 0: 
        if (!bool2)
        {
          if (this.x == 2)
          {
            c(false);
            if (bool2) {
              return;
            }
            if (!bool1) {
              break;
            }
          }
          else
          {
            if (bool2) {
              break label208;
            }
          }
        }
        else if (this.x != 0)
        {
          b(false);
          if (bool2) {
            return;
          }
          if (!bool1) {
            break;
          }
        }
        break;
      case 1: 
        if (!bool2)
        {
          if (this.x == 2) {
            c(false);
          }
          d().b((byte)1);
          a((byte)0);
          b(true);
          if (bool2) {
            return;
          }
        }
        if (!bool1) {
          break;
        }
      case 2: 
        c(true);
        if (bool2) {
          return;
        }
        if (!bool1) {
          break;
        }
      case 3: 
        if (!bool2)
        {
          if (this.x == 2) {
            c(false);
          }
          b(true);
          if (bool2) {
            return;
          }
        }
        if (!bool1) {
          break;
        }
      case 4: 
        if (!bool2) {
          if (this.x == 2) {
            c(false);
          }
        }
        this.w = 555;
      }
      label208:
      this.x = paramInt;
    }
  }
  
  private void a(byte paramByte)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    g localg = d();
    Object localObject;
    do
    {
      localObject = localg.R();
      while (!bool1)
      {
        if (!((w)localObject).e()) {
          break;
        }
        if (bool1) {
          break label66;
        }
        localg.w(((w)localObject).d()).a(paramByte, true);
        ((w)localObject).f();
      }
    } while (bool2);
    label66:
    do
    {
      localObject = localg.S();
      while (!bool1)
      {
        if (!((m)localObject).e()) {
          break;
        }
        if (bool1) {
          break label115;
        }
        localg.t(((m)localObject).a()).a(paramByte);
        ((m)localObject).f();
      }
    } while (bool2);
    label115:
    do
    {
      localObject = localg.U();
      while (!bool1)
      {
        if (!((fb)localObject).e()) {
          break;
        }
        localg.t(((fb)localObject).a().a()).a(paramByte);
        ((fb)localObject).f();
      }
    } while (bool2);
  }
  
  void g(Graphics2D paramGraphics2D)
  {
    this.q.setTransform(this.p, 0.0D, 0.0D, this.p, -this.s.x * this.p, -this.s.y * this.p);
    paramGraphics2D.setTransform(this.q);
  }
  
  void h(Graphics2D paramGraphics2D)
  {
    this.q.setToIdentity();
    paramGraphics2D.setTransform(this.q);
  }
  
  public double c(double paramDouble)
  {
    return paramDouble / this.p + this.s.x;
  }
  
  public double d(double paramDouble)
  {
    return paramDouble / this.p + this.s.y;
  }
  
  public double a(double paramDouble, boolean paramBoolean)
  {
    boolean bool = ld.E;
    double d = c(paramDouble);
    if (((bool) || (paramBoolean)) && ((bool) || (this.D))) {
      d = (int)(Math.floor(d / this.E + 0.5D) * this.E);
    }
    return d;
  }
  
  public double b(double paramDouble, boolean paramBoolean)
  {
    boolean bool = ld.E;
    double d = d(paramDouble);
    if (((bool) || (paramBoolean)) && ((bool) || (this.D))) {
      d = (int)(Math.floor(d / this.F + 0.5D) * this.F);
    }
    return d;
  }
  
  public int e(double paramDouble)
  {
    return (int)((paramDouble - this.s.x) * this.p);
  }
  
  public int f(double paramDouble)
  {
    return (int)((paramDouble - this.s.y) * this.p);
  }
  
  Rectangle c(Rectangle paramRectangle)
  {
    paramRectangle.setFrame((paramRectangle.getX() - this.s.getX()) * this.p, (paramRectangle.getY() - this.s.getY()) * this.p, paramRectangle.getWidth() * this.p, paramRectangle.getHeight() * this.p);
    return paramRectangle;
  }
  
  Rectangle a(Rectangle2D.Double paramDouble, Rectangle paramRectangle)
  {
    if (!ld.E)
    {
      if (paramRectangle == null) {
        paramRectangle = new Rectangle();
      }
      paramRectangle.setFrame((paramDouble.getX() - this.s.getX()) * this.p, (paramDouble.getY() - this.s.getY()) * this.p, paramDouble.getWidth() * this.p, paramDouble.getHeight() * this.p);
    }
    return paramRectangle;
  }
  
  Point a(Point paramPoint)
  {
    paramPoint.setLocation((paramPoint.getX() - this.s.getX()) * this.p, (paramPoint.getY() - this.s.getY()) * this.p);
    return paramPoint;
  }
  
  Point a(Point2D.Double paramDouble, Point paramPoint)
  {
    if (!ld.E)
    {
      if (paramPoint == null) {
        paramPoint = new Point();
      }
      paramPoint.setLocation((paramDouble.x - this.s.x) * this.p, (paramDouble.y - this.s.y) * this.p);
    }
    return paramPoint;
  }
  
  Rectangle d(Rectangle paramRectangle)
  {
    paramRectangle.width = ((int)(paramRectangle.width / this.p));
    paramRectangle.height = ((int)(paramRectangle.height / this.p));
    paramRectangle.x = ((int)(paramRectangle.x / this.p + this.s.x));
    paramRectangle.y = ((int)(paramRectangle.y / this.p + this.s.y));
    return paramRectangle;
  }
  
  Rectangle2D.Double a(Rectangle paramRectangle, Rectangle2D.Double paramDouble)
  {
    if (!ld.E)
    {
      if (paramDouble == null) {
        paramDouble = new Rectangle2D.Double();
      }
      paramDouble.width = (paramRectangle.width / this.p);
      paramDouble.height = (paramRectangle.height / this.p);
      paramDouble.x = (paramRectangle.x / this.p + this.s.x);
      paramDouble.y = (paramRectangle.y / this.p + this.s.y);
    }
    return paramDouble;
  }
  
  public void c(boolean paramBoolean)
  {
    boolean bool = ld.E;
    if (!bool) {
      if (this.w == 666) {
        d(false);
      }
    }
    if (!bool)
    {
      if (paramBoolean)
      {
        this.w = 2;
        if (bool) {
          return;
        }
      }
    }
    else {
      if (!ld.D) {
        break label51;
      }
    }
    this.w = 0;
    label51:
    this.u.setRect(0.0D, 0.0D, 0.0D, 0.0D);
    this.v = null;
  }
  
  public void e(Rectangle paramRectangle)
  {
    this.u.setRect(paramRectangle);
  }
  
  public void a(Rectangle2D paramRectangle2D)
  {
    this.u.setRect(paramRectangle2D);
  }
  
  public Rectangle s()
  {
    return a(this.u);
  }
  
  public Rectangle2D.Double t()
  {
    return b(this.u);
  }
  
  public void a(hg paramhg, double paramDouble1, double paramDouble2, PropertyChangeListener paramPropertyChangeListener, boolean paramBoolean)
  {
    a(paramhg, paramDouble1, paramDouble2, paramPropertyChangeListener, paramBoolean, false, true);
  }
  
  public void a(hg paramhg, double paramDouble1, double paramDouble2, PropertyChangeListener paramPropertyChangeListener, boolean paramBoolean1, boolean paramBoolean2)
  {
    a(paramhg, paramDouble1, paramDouble2, paramPropertyChangeListener, paramBoolean1, paramBoolean2, true);
  }
  
  public void a(hg paramhg, double paramDouble1, double paramDouble2, PropertyChangeListener paramPropertyChangeListener, boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (this.w == 666) {
      return;
    }
    String str1 = paramhg.H();
    JTextArea local1 = new JTextArea(str1)
    {
      public Dimension getPreferredSize()
      {
        Dimension localDimension = super.getPreferredSize();
        if ((ld.E) || (isEditable())) {
          try
          {
            Rectangle localRectangle = modelToView(getCaretPosition());
            if ((localRectangle != null) && (localDimension != null) && (localRectangle.x + 3 > localDimension.width)) {
              localDimension.width = (localRectangle.x + Math.max(0, localRectangle.width) + 3);
            }
          }
          catch (BadLocationException localBadLocationException) {}
        }
        return localDimension;
      }
      
      protected void paintComponent(Graphics paramAnonymousGraphics)
      {
        if (paramAnonymousGraphics.getFontMetrics().getHeight() > 0) {
          super.paintComponent(paramAnonymousGraphics);
        }
      }
    };
    local1.setFont(paramhg.U());
    local1.setEditable(true);
    local1.setBorder(BorderFactory.createLineBorder(Color.red));
    this.q.setTransform(this.p, 0.0D, 0.0D, this.p, 0.0D, 0.0D);
    local1.setFont(local1.getFont().deriveFont(this.q));
    try
    {
      String str2 = System.getProperty("os.name").toLowerCase();
      if (str2.startsWith("mac"))
      {
        localObject1 = paramhg.U();
        localObject1 = new Font(((Font)localObject1).getFontName(), ((Font)localObject1).getStyle(), (int)Math.ceil(this.p * ((Font)localObject1).getSize()));
        local1.setFont((Font)localObject1);
      }
    }
    catch (SecurityException localSecurityException) {}
    local1.setCaretPosition(local1.getText().length());
    local1.selectAll();
    local1.putClientProperty("ylabel", paramhg);
    local1.putClientProperty("pcl", paramPropertyChangeListener);
    local1.putClientProperty("oldLabelText", str1);
    local1.putClientProperty("commitValue", paramBoolean3 ? Boolean.TRUE : Boolean.FALSE);
    KeyAdapter local3 = new KeyAdapter()
    {
      private final boolean val$singleLineMode;
      private final JTextArea val$editor;
      
      public void keyPressed(KeyEvent paramAnonymousKeyEvent)
      {
        boolean bool2 = ld.E;
        boolean bool1 = ld.D;
        if (!bool2) {
          if (paramAnonymousKeyEvent.getKeyCode() == 10)
          {
            if (!bool2) {
              if (this.val$singleLineMode)
              {
                if (!bool2)
                {
                  if (!paramAnonymousKeyEvent.isControlDown())
                  {
                    if (bool2) {
                      break label87;
                    }
                    if (!paramAnonymousKeyEvent.isShiftDown()) {}
                  }
                  else
                  {
                    this.val$editor.insert("\n", this.val$editor.getCaretPosition());
                  }
                }
                else
                {
                  if (bool2) {
                    break label87;
                  }
                  if (!bool1) {
                    return;
                  }
                }
                og.this.d(true);
                label87:
                if ((!bool2) && (!bool1)) {
                  return;
                }
              }
            }
            if (!bool2) {
              if (!paramAnonymousKeyEvent.isControlDown())
              {
                if (!bool2) {
                  if (!paramAnonymousKeyEvent.isShiftDown()) {
                    return;
                  }
                }
              }
              else {
                og.this.d(true);
              }
            }
          }
        }
        if (((bool2) || (bool1)) && (paramAnonymousKeyEvent.getKeyCode() == 27)) {
          og.this.d(false);
        }
      }
    };
    local1.addKeyListener(local3);
    local1.addCaretListener(new CaretListener()
    {
      private final JTextArea val$editor;
      
      public void caretUpdate(CaretEvent paramAnonymousCaretEvent)
      {
        this.val$editor.revalidate();
      }
    });
    Object localObject1 = new gf(this.B)
    {
      public void mouseReleased(MouseEvent paramAnonymousMouseEvent)
      {
        og.this.d(true);
      }
      
      public void mouseEntered(MouseEvent paramAnonymousMouseEvent) {}
    };
    ArrayList localArrayList1 = new ArrayList(this.S);
    ArrayList localArrayList2 = new ArrayList();
    local1.putClientProperty("disabledViewModes", localArrayList2);
    Object localObject2 = localArrayList1.iterator();
    if (((Iterator)localObject2).hasNext()) {}
    do
    {
      gf localgf = (gf)((Iterator)localObject2).next();
      if (bool2) {
        break label420;
      }
      b(localgf);
      localArrayList2.add(localgf);
      if (bool1) {
        break label419;
      }
      if (!bool1) {
        break;
      }
      a((gf)localObject1);
      local1.putClientProperty("activeViewMode", localObject1);
    } while (bool2);
    local1.putClientProperty("yvl", localObject1);
    label419:
    label420:
    localObject2 = a(new Point2D.Double(paramDouble1, paramDouble2), null);
    local1.putClientProperty(he.a, paramBoolean2 ? Boolean.TRUE : Boolean.FALSE);
    local1.putClientProperty(he.b, paramBoolean2 ? localObject2 : new Point(((Point)localObject2).x, ((Point)localObject2).y - 2));
    local1.putClientProperty(he.c, null);
    this.w = 666;
    add(this.U = local1);
    validate();
    local1.requestFocus();
  }
  
  void d(boolean paramBoolean)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (!bool2)
    {
      if (this.w == 666) {
        this.w = 0;
      }
    }
    else
    {
      JTextArea localJTextArea = this.U;
      if ((bool2) || (localJTextArea != null))
      {
        hg localhg = (hg)localJTextArea.getClientProperty("ylabel");
        PropertyChangeListener localPropertyChangeListener = (PropertyChangeListener)localJTextArea.getClientProperty("pcl");
        Object localObject1 = localJTextArea.getClientProperty("commitValue");
        if (!bool2) {}
        int i = (localObject1 instanceof Boolean) ? ((Boolean)localObject1).booleanValue() : 1;
        remove(localJTextArea);
        this.U = null;
        gf localgf = (gf)localJTextArea.getClientProperty("activeViewMode");
        List localList = (List)localJTextArea.getClientProperty("disabledViewModes");
        if (localgf != null) {
          b(localgf);
        }
        Object localObject2;
        if ((bool2) || (localList != null))
        {
          localObject2 = localList.iterator();
          do
          {
            if (!((Iterator)localObject2).hasNext()) {
              break;
            }
            if (bool2) {
              break label322;
            }
            a((gf)((Iterator)localObject2).next());
            if (bool1) {
              break label321;
            }
          } while (!bool1);
        }
        if (!bool2)
        {
          if (paramBoolean)
          {
            localObject2 = (String)localJTextArea.getClientProperty("oldLabelText");
            String str1 = localhg.H();
            String str2 = localJTextArea.getText();
            if (((bool2) || (str1.equals(localObject2))) && ((bool2) || (!str2.equals(str1))))
            {
              if (!bool2)
              {
                if (i != 0)
                {
                  localhg.a(str2);
                  if (bool2) {
                    break label314;
                  }
                  a(localPropertyChangeListener, localhg, str1, localhg.H());
                }
              }
              else {
                if (!bool1) {
                  break label317;
                }
              }
              label314:
              a(localPropertyChangeListener, localhg, str1, str2);
            }
          }
          label317:
          validate();
        }
        label321:
        label322:
        e();
      }
      this.B.requestFocus();
    }
  }
  
  private static void a(PropertyChangeListener paramPropertyChangeListener, hg paramhg, String paramString1, String paramString2)
  {
    if ((ld.E) || (paramPropertyChangeListener != null)) {
      paramPropertyChangeListener.propertyChange(new PropertyChangeEvent(paramhg, "text", paramString1, paramString2));
    }
  }
  
  public void a(qb paramqb)
  {
    this.K.b(paramqb);
  }
  
  public void b(qb paramqb)
  {
    this.K.remove(paramqb);
  }
  
  public void c(qb paramqb)
  {
    this.L.add(paramqb);
  }
  
  public void d(qb paramqb)
  {
    this.L.remove(paramqb);
  }
  
  public void a(Color paramColor)
  {
    Color localColor = this.G;
    this.G = paramColor;
    firePropertyChange("GridColor", localColor, this.G);
  }
  
  public Color u()
  {
    return this.G;
  }
  
  public void e(boolean paramBoolean)
  {
    boolean bool = this.D;
    this.D = paramBoolean;
    firePropertyChange("GridMode", bool, this.D);
  }
  
  public boolean v()
  {
    return this.D;
  }
  
  public void b(int paramInt)
  {
    int i = this.H;
    this.H = paramInt;
    firePropertyChange("GridType", i, this.H);
  }
  
  public int w()
  {
    return this.H;
  }
  
  public void g(double paramDouble)
  {
    double d = this.E;
    this.E = paramDouble;
    this.F = paramDouble;
    firePropertyChange("GridResolution", d, this.E);
  }
  
  public double x()
  {
    return this.E;
  }
  
  private static Rectangle a(Rectangle paramRectangle, int paramInt)
  {
    paramRectangle.x -= paramInt;
    paramRectangle.y -= paramInt;
    paramInt *= 2;
    paramRectangle.width += paramInt;
    paramRectangle.height += paramInt;
    return paramRectangle;
  }
  
  private static Rectangle a(Rectangle2D.Double paramDouble)
  {
    return new Rectangle((int)paramDouble.x, (int)paramDouble.y, (int)paramDouble.width, (int)paramDouble.height);
  }
  
  private static Rectangle2D.Double b(Rectangle2D.Double paramDouble)
  {
    return new Rectangle2D.Double(paramDouble.x, paramDouble.y, paramDouble.width, paramDouble.height);
  }
  
  private static Rectangle2D.Double f(Rectangle paramRectangle)
  {
    return new Rectangle2D.Double(paramRectangle.x, paramRectangle.y, paramRectangle.width, paramRectangle.height);
  }
  
  private static Rectangle2D.Double a(Rectangle2D.Double paramDouble1, Rectangle2D.Double paramDouble2)
  {
    Rectangle2D.union(paramDouble1, paramDouble2, paramDouble1);
    return paramDouble1;
  }
  
  private static Rectangle a(Rectangle paramRectangle1, Rectangle paramRectangle2)
  {
    return paramRectangle1.union(paramRectangle2);
  }
  
  public Rectangle getVisibleRect()
  {
    return new Rectangle((int)this.s.x, (int)this.s.y, (int)(F() / i()), (int)(G() / i()));
  }
  
  public Rectangle2D.Double y()
  {
    return new Rectangle2D.Double(this.s.x, this.s.y, F() / i(), G() / i());
  }
  
  public hc z()
  {
    return this.O;
  }
  
  public void a(hc paramhc)
  {
    this.O = paramhc;
  }
  
  private boolean A()
  {
    boolean bool = ld.E;
    if (!bool)
    {
      if (this.w == 2) {
        return true;
      }
      if (bool) {}
    }
    else if (this.w == 1)
    {
      b(false);
      if (bool) {
        break label59;
      }
      if (!ld.D) {
        break label58;
      }
    }
    if (!bool) {
      if (this.w != 0) {
        return false;
      }
    }
    label58:
    label59:
    return true;
  }
  
  public void a(db paramdb)
  {
    this.M = paramdb;
  }
  
  public db B()
  {
    return this.M;
  }
  
  public void setToolTipText(String paramString)
  {
    this.N = paramString;
  }
  
  public String getToolTipText()
  {
    return this.N;
  }
  
  public JToolTip createToolTip()
  {
    if ((ld.E) || (this.B != null))
    {
      localObject = this.B.createToolTip();
      ((JToolTip)localObject).setComponent(this);
      return localObject;
    }
    Object localObject = new ug();
    ((JToolTip)localObject).setComponent(this);
    return localObject;
  }
  
  private int C()
  {
    if (!ld.E) {}
    return this.B.getWidth() > 0 ? this.B.getWidth() : this.B.getPreferredSize().width;
  }
  
  private int D()
  {
    if (!ld.E) {}
    return this.B.getHeight() > 0 ? this.B.getHeight() : this.B.getPreferredSize().height;
  }
  
  int F()
  {
    if (!ld.E) {}
    return getWidth() > 0 ? getWidth() : C();
  }
  
  int G()
  {
    if (!ld.E) {}
    return getHeight() > 0 ? getHeight() : D();
  }
  
  boolean H()
  {
    if (!ld.E) {}
    return this.w != 666;
  }
  
  void f(boolean paramBoolean)
  {
    this.C = paramBoolean;
  }
  
  boolean I()
  {
    return this.C;
  }
  
  void i(Graphics2D paramGraphics2D)
  {
    double d = 1.0D / i();
    paramGraphics2D.translate(this.s.getX(), this.s.getY());
    paramGraphics2D.scale(d, d);
  }
  
  void j(Graphics2D paramGraphics2D)
  {
    double d = this.B.M();
    paramGraphics2D.scale(d, d);
    paramGraphics2D.translate(-this.s.getX(), -this.s.getY());
  }
  
  static final void a(og paramog, Graphics2D paramGraphics2D, double paramDouble1, double paramDouble2)
  {
    c(paramog, paramGraphics2D, paramDouble1, paramDouble2);
  }
  
  public boolean J()
  {
    return this.Q;
  }
  
  public void g(boolean paramBoolean)
  {
    boolean bool = this.Q;
    this.Q = paramBoolean;
    firePropertyChange("GridVisible", bool, this.Q);
  }
  
  public boolean K()
  {
    return this.R;
  }
  
  public void h(boolean paramBoolean)
  {
    this.R = paramBoolean;
  }
  
  public void autoscroll(Point paramPoint)
  {
    boolean bool = ld.E;
    if ((bool) || ((getParent() instanceof pg)))
    {
      int i = getWidth();
      int i1 = getHeight();
      if (!bool) {}
      int i2 = (bool) || (paramPoint.x > i - this.W.right) ? paramPoint.x - (i - this.W.right) : paramPoint.x < this.W.left ? paramPoint.x - this.W.left : 0;
      if (!bool) {}
      int i3 = (bool) || (paramPoint.y > i1 - this.W.bottom) ? paramPoint.y - (i1 - this.W.bottom) : paramPoint.y < this.W.top ? paramPoint.y - this.W.top : 0;
      if (!bool)
      {
        if ((i2 != 0) || (i3 != 0)) {
          ((pg)getParent()).b(this.s.x + i2 * 3.0D / this.p, this.s.y + i3 * 3.0D / this.p);
        }
      }
      else {
        ((pg)getParent()).b();
      }
    }
  }
  
  public Insets getAutoscrollInsets()
  {
    return this.W;
  }
  
  public List L()
  {
    return this.S;
  }
  
  public void a(gf paramgf)
  {
    if (!ld.E)
    {
      if (paramgf != null)
      {
        paramgf.a(this.B);
        addMouseListener(paramgf);
        addMouseMotionListener(paramgf);
        this.S.add(paramgf);
      }
    }
    else {
      paramgf.b(true);
    }
  }
  
  public void b(gf paramgf)
  {
    boolean bool = ld.E;
    if (paramgf != null)
    {
      if (!bool)
      {
        if (this.S.remove(paramgf))
        {
          if (!bool) {
            if (paramgf.a()) {
              paramgf.b();
            }
          }
          paramgf.b(false);
        }
        removeMouseListener(paramgf);
      }
      removeMouseMotionListener(paramgf);
    }
  }
  
  static void c(og paramog, Graphics2D paramGraphics2D, double paramDouble1, double paramDouble2)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    Font localFont = new Font("Dialog", 0, 12);
    TextLayout localTextLayout = new TextLayout("Powered by yFiles", localFont, paramGraphics2D.getFontRenderContext());
    Color localColor1 = paramGraphics2D.getColor();
    Color localColor2 = a(paramog);
    if (localColor2 == null)
    {
      float f1 = (float)paramDouble1;
      float f2 = (float)paramDouble2;
      paramGraphics2D.setColor(Color.white);
      localTextLayout.draw(paramGraphics2D, f1 + 1.0F, f2 + 1.0F);
      paramGraphics2D.setColor(Color.lightGray);
      localTextLayout.draw(paramGraphics2D, f1, f2);
      if (bool2) {
        return;
      }
      if (!bool1) {}
    }
    else
    {
      int i = (int)Math.rint(0.2126D * localColor2.getRed() + 0.7152D * localColor2.getGreen() + 0.0722D * localColor2.getBlue());
      if (!bool2) {
        if (i < 43)
        {
          paramGraphics2D.setColor(Color.DARK_GRAY);
          if ((!bool2) && (!bool1)) {
            break label310;
          }
        }
      }
      if (!bool2) {
        if (i < 86)
        {
          paramGraphics2D.setColor(X);
          if ((!bool2) && (!bool1)) {
            break label310;
          }
        }
      }
      if (!bool2) {
        if (i < 128)
        {
          paramGraphics2D.setColor(Y);
          if ((!bool2) && (!bool1)) {
            break label310;
          }
        }
      }
      if (!bool2)
      {
        if (i < 171)
        {
          paramGraphics2D.setColor(X);
          if ((!bool2) && (!bool1)) {
            break label310;
          }
        }
        if (bool2) {}
      }
      else
      {
        if (i >= 214) {
          break label303;
        }
        if (bool2) {
          break label307;
        }
        paramGraphics2D.setColor(Y);
      }
      if (bool1) {
        label303:
        label307:
        paramGraphics2D.setColor(Color.LIGHT_GRAY);
      }
      label310:
      localTextLayout.draw(paramGraphics2D, (float)paramDouble1, (float)paramDouble2);
    }
    paramGraphics2D.setColor(localColor1);
  }
  
  private static Color a(og paramog)
  {
    db localdb = paramog.M;
    if ((ld.E) || ((localdb instanceof jb))) {
      return ((jb)localdb).d();
    }
    return null;
  }
  
  static final class a_
    extends JComponent
  {
    final b_ a = new b_();
    public static final String b = "JCOMPONENT_PARENT_KEY";
    
    public a_()
    {
      addContainerListener(this.a);
      setSize(0, 0);
      setLayout(null);
      setVisible(true);
      setOpaque(true);
      setDoubleBuffered(false);
      putClientProperty("JCOMPONENT_PARENT_KEY", this);
    }
    
    public boolean isValidateRoot()
    {
      return true;
    }
    
    public Rectangle getBounds()
    {
      return new Rectangle(0, 0, getParent().getWidth(), getParent().getHeight());
    }
    
    public void paint(Graphics paramGraphics) {}
    
    final void a(Component paramComponent)
    {
      boolean bool2 = ld.E;
      boolean bool1 = ld.D;
      if ((bool2) || ((paramComponent instanceof JComponent)))
      {
        JComponent localJComponent = (JComponent)paramComponent;
        if (!bool2)
        {
          if (localJComponent.getClientProperty("JCOMPONENT_PARENT_KEY") != this) {
            localJComponent.addContainerListener(this.a);
          }
        }
        else
        {
          if (!bool2)
          {
            if (localJComponent.isDoubleBuffered())
            {
              localJComponent.putClientProperty("Graph2DView.WAS_DOUBLE_BUFFERED", Boolean.TRUE);
              localJComponent.setDoubleBuffered(false);
            }
            localJComponent.putClientProperty("JCOMPONENT_PARENT_KEY", this);
          }
          int i = localJComponent.getComponentCount() - 1;
          do
          {
            if (i < 0) {
              break;
            }
            a(localJComponent.getComponent(i));
            i--;
          } while (!bool1);
        }
      }
    }
    
    final void c(Component paramComponent)
    {
      boolean bool2 = ld.E;
      boolean bool1 = ld.D;
      if ((bool2) || ((paramComponent instanceof JComponent)))
      {
        JComponent localJComponent = (JComponent)paramComponent;
        if (!bool2) {
          if (localJComponent.getClientProperty("JCOMPONENT_PARENT_KEY") == this)
          {
            localJComponent.removeContainerListener(this.a);
            if (!bool2) {
              if (localJComponent.getClientProperty("Graph2DView.WAS_DOUBLE_BUFFERED") == Boolean.TRUE)
              {
                localJComponent.setDoubleBuffered(true);
                localJComponent.putClientProperty("Graph2DView.WAS_DOUBLE_BUFFERED", null);
              }
            }
            localJComponent.putClientProperty("JCOMPONENT_PARENT_KEY", null);
          }
        }
        int i = localJComponent.getComponentCount() - 1;
        do
        {
          if (i < 0) {
            break;
          }
          c(localJComponent.getComponent(i));
          i--;
        } while (!bool1);
      }
    }
    
    public void paintImmediately(Rectangle paramRectangle) {}
    
    protected void printComponent(Graphics paramGraphics) {}
    
    protected void printChildren(Graphics paramGraphics) {}
    
    protected void printBorder(Graphics paramGraphics) {}
    
    public void printAll(Graphics paramGraphics) {}
    
    public void print(Graphics paramGraphics) {}
    
    public void paintImmediately(int paramInt1, int paramInt2, int paramInt3, int paramInt4) {}
    
    protected void paintComponent(Graphics paramGraphics) {}
    
    protected void paintChildren(Graphics paramGraphics) {}
    
    protected void paintBorder(Graphics paramGraphics) {}
    
    public Cursor getCursor()
    {
      return Cursor.getDefaultCursor();
    }
    
    final class b_
      implements ContainerListener
    {
      b_() {}
      
      public void componentRemoved(ContainerEvent paramContainerEvent)
      {
        Component localComponent = paramContainerEvent.getChild();
        og.a_.this.c(localComponent);
      }
      
      public void componentAdded(ContainerEvent paramContainerEvent)
      {
        Component localComponent = paramContainerEvent.getChild();
        og.a_.this.a(localComponent);
      }
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.og

 * JD-Core Version:    0.7.0.1

 */